import request from '@/utils/request'

// 获取评论列表
export function getComments(params) {
  return request({
    url: 'comment/getComments',
    method: 'get',
    params
  })
}

// 获取评论详情
export function getCommentDetail(params) {
  return request({
    url: 'comment/getCommentDetail',
    method: 'get',
    params
  })
}

// 创建评论
export function createComment(data) {
  return request({
    url: 'comment/createComment',
    method: 'post',
    data
  })
}

// 更新评论
export function updateComment(data) {
  return request({
    url: 'comment/updateComment',
    method: 'post',
    data
  })
}

// 删除评论
export function deleteComment(data) {
  return request({
    url: 'comment/deleteComment',
    method: 'post',
    data
  })
}

// 批量删除评论
export function batchDeleteComments(data) {
  return request({
    url: 'comment/batchDeleteComments',
    method: 'post',
    data
  })
}

// 更新评论状态
export function updateCommentStatus(data) {
  return request({
    url: 'comment/updateCommentStatus',
    method: 'post',
    data
  })
}